package edu.gatech.ors.mrsim.core;

import java.util.Collection;
import java.util.HashMap;

public class Cluster {
	private HashMap<String, Node> nodes;

	public Cluster(HashMap<String, Node> nodes) {
		this.nodes = nodes;
	}

	public void addNode(Node node) {
		if (node != null)
			nodes.put(node.getName(), node);
	}

	public Collection<String> getNodeIDs() {
		return nodes.keySet();
	}

	public Collection<Node> getNodes() {
		return nodes.values();
	}

	public Node getNode(String ID) {
		return nodes.get(ID);
	}

}
